package br.com.skytef.beans.WEB;

import java.sql.SQLException;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;

@ManagedBean(name = "configBeans")
public class ConfigurationBean {

	public void sendMessageOk(String message) throws SQLException, Exception {
		FacesContext facesContext = FacesContext.getCurrentInstance();
		facesContext.addMessage(null, new FacesMessage(
				FacesMessage.SEVERITY_INFO, "Aviso:", message));
	}

	public void sendMessageErr(String message) throws SQLException, Exception {
		FacesContext facesContext = FacesContext.getCurrentInstance();
		facesContext.addMessage(null, new FacesMessage(
				FacesMessage.SEVERITY_ERROR, "Erro:", message));
	}
}
